#pragma once
#include "../importdll.h"

class XmlHelper
{
public:
	XmlHelper(void);
	~XmlHelper(void);

	static bool   GetAttrib(MSXML2::IXMLDOMElementPtr elem,LPCTSTR propName, CString& propValue,CString defValue=_T(""));
	static bool   GetAttrib(MSXML2::IXMLDOMElementPtr elem,LPCTSTR propName, int& propValue,int defValue=0);
	static bool   SetAttrib(MSXML2::IXMLDOMElementPtr elem,LPCTSTR propName, CString  propValue);
    
    static MSXML2::IXMLDOMElementPtr CreateChildNode(MSXML2::IXMLDOMDocumentPtr doc,MSXML2::IXMLDOMElementPtr elem,LPCTSTR nodeName,LPCTSTR nodeValue=_T(""));
    static MSXML2::IXMLDOMElementPtr GetChildNode(MSXML2::IXMLDOMElementPtr elem,LPCTSTR nodeName,CString& nodeValue);

    static bool   SetAttrib(MSXML2::IXMLDOMElementPtr elem,LPCTSTR propName,BYTE* lpByte,int count);
    static bool   GetAttrib(MSXML2::IXMLDOMElementPtr elem,LPCTSTR propName,BYTE* lpByte,int maxCount);

};
